<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>所有咨询</a></li>
        <li><a href="{:url('/company/admin_qa/add')}">咨询添加</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('/company/admin_qa/index')}">
        类型：
        <select class="form-control" id="type_id" name="type_id" >

            <php>


                $qaType = config('qa_type');

                foreach ($qaType as $key=>$value) {

                    $selected="";
                    if($key == (empty($_REQUEST['type_id'])?"":$_REQUEST['type_id'] ) ){
                        $selected="selected";
                    }

                    echo "<option value='$key' $selected>$value</option>";
                }

            </php>


        </select>
        状态：
        <select class="form-control" id="status_id" name="status_id" >
            <option value="">请选择状态</option>
            <volist name="qa_status" id="vo">
                <php>
                    $selected="";
                    if($vo->id== (empty($_REQUEST['status_id'])?"":$_REQUEST['status_id'] ) ){
                    $selected="selected";
                    }
                </php>
                <option value="{$vo.id}" {$selected}>{$vo.name}</option>
            </volist>
        </select>

        关键字：
        <input class="form-control" type="text" name="title" style="width: 200px;" value="{:input('request.title')}"
               placeholder="标题\关键字">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('/Company/admin_qa/index')}">清空</a>
    </form>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>序号</th>
                <th>标题</th>
                <th>类型</th>
                <th>分类</th>
                <th>状态</th>
                <th>时间</th>
                <th>联系人</th>
                <th>手机</th>
                <th>所在群</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>

            <foreach name="qa_list" item="vo" key="k">
                <tr>
                    <td>{$k+1}</td>
                    <td>{$vo['title']}
                    </td>
                    <td>{$vo['type_name']}</td>
                    <td>{$vo.category_name}</td>
                    <td>{$vo.status_name}</td>
                    <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                    <td>{$vo['person_name']}</td>
                    <td>{$vo['person_phone']}</td>
                    <td>{$vo['group_name']}</td>
                    <td>
                        <a href="{:url('/company/admin_qa/edit',array('id'=>$vo['id']))}" >修改</a>
                        <a href="{:url('/company/admin_qa/reply',array('parent_id'=>$vo['id']))}" >回复</a>


                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>

<script >

    function openapp(url,win,title) {
        parent.openapp(url,win,title);
    }

</script>
</body>
</html>